package org.example.inventory.entity;

import java.math.BigDecimal;
import java.time.LocalDateTime;

public class Product extends BaseEntity {
    private String name;
    private BigDecimal price;
    private Integer stock;
    private String description;
    private LocalDateTime createTime;
    private LocalDateTime lastRestockTime;

    public Product(String name, BigDecimal price, Integer stock, String description) {
        this.name = name;
        this.price = price;
        this.stock = stock;
        this.description = description;
    }

    @Override
    public String toString() {
        return "Product{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", price=" + price +
                ", stock=" + stock +
                ", description='" + description + '\'' +
                ", createTime=" + createTime +
                ", lastRestockTime=" + lastRestockTime +
                '}'+"\n";
    }

    public Product(Integer id, String name, BigDecimal price, Integer stock, String description, LocalDateTime createTime, LocalDateTime lastRestockTime) {
        this.id = id;
        this.name = name;
        this.price = price;
        this.stock = stock;
        this.description = description;
        this.createTime = createTime;
        this.lastRestockTime = lastRestockTime;
    }

    public Product() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getLastRestockTime() {
        return lastRestockTime;
    }

    public void setLastRestockTime(LocalDateTime lastRestockTime) {
        this.lastRestockTime = lastRestockTime;
    }
}
